from django.http import HttpResponse
from django.shortcuts import render
from .models import Content
# Create your views here.
def myload_view(request):
    if request.method=='GET':
        return render(request,'update.html')
    elif request.method=='POST':
        myfile=request.FILES['myfile']
        Content.objects.create(desc=myfile.name,myfile=myfile)
        return HttpResponse('ok')


def index_view(request):
    return render(request,'index.html')